﻿using IBLL;
using IDAL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BLL
{
    public class TypeBLL : ITypeBLL
    {
        public TypeBLL(IEmployeeDAL<TypeModel>dal)
        {
            Dal = dal;
        }

        public IEmployeeDAL<TypeModel> Dal { get; }

        public Task<int> AddType(TypeModel type)
        {
            return Dal.AddAsync(type);
        }

        public List<TypeModel> GetTypes()
        {
            return Dal.GetAllAsync().ToList();
        }
    }
}
